import type { AppRouteModule } from '/@/router/types';

// import { getParentLayout, LAYOUT } from '/@/router/constant';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const fzz: AppRouteModule = {
  path: '/hcManager',
  name: 'hcManager',
  component: LAYOUT,
  redirect: '/hcManager/investigate',
  meta: {
    orderNo: 207,
    icon: 'ion:layers-outline',
    title: t('routes.demo.hcManager.root'),
    roles: ['City', 'Area', 'UnitAdmin', 'CityUnitAdmin', 'Street'],
    userGroups: ['Admin', 'FireControl'],
  },
  children: [
    // 工作进展统计
    // {
    //   path: 'hcDange',
    //   name: 'hcDange',
    //   meta: {
    //     title: t('routes.demo.hcManager.hcDanger'),
    //     hideChildrenInMenu: true,
    //     roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator'],
    //     //roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
    //     // userGroups: ['Admin', 'FireControl'],
    //     //roles: ['City'],
    //     userGroups: ['Admin', 'FireControl'],
    //   },
    //   component: () => import('/@/views/hcManager/hcDange/index.vue'),
    // },
    {
      path: 'VerifyStatisticalDetails',
      name: 'VerifyStatisticalDetails',
      meta: {
        title: t('routes.demo.hcManager.VerifyStatisticalDetails'),
        hideChildrenInMenu: true,
        roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator'],
        userGroups: ['Admin', 'FireControl'],
      },
      // component: () => import('/@/views/balconyManager/balconyCount/dangeIndex.vue'),
      component: () => import('/@/views/hcManager/VerifyStatisticalDetails/index.vue'),
      children: [
        {
          path: 'mxdetail',
          name: 'mxdetail',
          meta: {
            dynamicTitle: true, // 标记需要动态更新
            hideMenu: false,
            roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
            userGroups: ['Admin', 'FireControl'],
            title: '',
          },
          component: () =>
            import('/@/views/hcManager/VerifyStatisticalDetails/component/mxdetailDrawer.vue'),
        },
      ],
    },
     // 工作进展统计明细
    {
      path: 'hcDetail',
      name: 'hcDetail',
      meta: {
        title: t('routes.demo.hcManager.hcDetail'),
        hideChildrenInMenu: true,
        roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator', 'FireControl'],
        //roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
        // userGroups: ['Admin', 'FireControl'],
        //roles: ['City'],
        userGroups: ['Admin', 'FireControl'],
      },
      component: () => import('/@/views/hcManager/hcDetail/index.vue'),
      children: [
        {
          path: 'hchourselist',
          name: 'hchourselist',
          meta: {
            dynamicTitle: true, // 标记需要动态更新
            hideMenu: false,
            roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
            userGroups: ['Admin', 'FireControl'],
            title: '',
          },
          component: () => import('/@/views/hcManager/hcDetail/component/hchourselist.vue'),
        },
      ],
    },
    // {
    //   path: 'hcstatistics',
    //   name: 'hcstatistics',
    //   meta: {
    //     title: t('routes.demo.hcManager.hcstatistics'),
    //     hideChildrenInMenu: true,
    //     roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator', 'FireControl'],
    //     //roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
    //     // userGroups: ['Admin', 'FireControl'],
    //     //roles: ['City'],
    //     userGroups: ['Admin', 'FireControl'],
    //   },
    //  // component: () => import('/@/views/balconyManager/balconyCount/dangeIndex.vue'),
    //   component: () => import('/@/views/hcManager/hcstatistics/index.vue'),
    // },
    {
      path: 'sjother',
      name: 'sjother',
      meta: {
        title: t('routes.demo.hcManager.sjother'),
        hideChildrenInMenu: true,
        roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator', 'FireControl'],
        //roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
        // userGroups: ['Admin', 'FireControl'],
        //roles: ['City'],
        userGroups: ['Admin', 'FireControl'],
      },
     // component: () => import('/@/views/balconyManager/balconyCount/dangeIndex.vue'),
      component: () => import('/@/views/hcManager/sjother/index.vue'),
    },
    {
      path: 'sjhymc',
      name: 'sjhymc',
      meta: {
        title: t('routes.demo.hcManager.sjhymc'),
        hideChildrenInMenu: true,
        roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator', 'FireControl'],
        //roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
        // userGroups: ['Admin', 'FireControl'],
        //roles: ['City'],
        userGroups: ['Admin', 'FireControl'],
      },
     // component: () => import('/@/views/balconyManager/balconyCount/dangeIndex.vue'),
      component: () => import('/@/views/hcManager/sjhymc/index.vue'),
    },
  ],
};

export default fzz;
